package treedummy;



public class Node
{

	private Node parent;
	private Node root;
	private String name;
	private boolean expanded;
	
	public Node(Node parent) {
        this.parent = parent;
        this.root = parent.getRoot();
    }

	public Node(){
		this.parent = this;
		this.root = this;
	}
	
	
	public void setParent(Node n){
		this.parent = n;
	}
	
	public Node getParent(){
		return parent;
	}
	
	public void setRoot(Node root){
		this.root = root;
	}
	
	public Node getRoot(){
		return root;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public boolean isExpanded()
	{
		return expanded;
	}

	public void setExpanded(boolean expanded)
	{
		this.expanded = expanded;
	}
	
	
}
